package hot_100;

import java.util.Scanner;

/**
 * https://blog.csdn.net/qq_40703471/article/details/123723665?spm=1001.2014.3001.5501
 */

public class ClimbStairs {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextInt()) {
            int n = sc.nextInt();
            System.out.println(climbStairs(n));
        }
    }

    public static int climbStairs(int n) {
        int a = 0;
        int b = 0;
        int res = 1;
        for (int i = 1; i <= n; i++) {
            a = b;
            b = res;
            res = a + b;
        }
        return res;
    }
}
